<% include header.ejs %>

<div class="header">
    <div class="inner">
        <div class="logo"><a href="/" title="返回首页"></a></div>
        <div class="link">
            <ul class="list">
                <li>
                    <div class="title">
                        <a>老师APP</span></a>
                        <div class="link-wbox">
                            <div class="link-wtriangle"></div>
                            <div class="link-wbg">
                                <img
                                        src="ages/publicbanner/2wteacher-v1.png"
                                        width="100" height="100">
                                <p>手机扫描二维码下载</p></div>
                        </div>
                    </div>
                </li>

                <li class="v-menu-hover v-menu-click ">
                    <div class="title">
                        <a href="http://ucenter.17zuoye.com/teacher/center/index.vpage#/teacher/message/index.vpage"><span
                                    class="w-icon w-icon-7"></span><span class="w-icon-md">消息</span></a>
                    </div>
                    <div class="info-bar"><span class="v-msg-count w-icon-arrow w-icon-redInfo"
                                                style="display: none;"></span></div>
                </li>
                <li class="v-menu-hover pull-down "><!--active-->
                    <div class="title">
                        <a href=""><span class="w-icon w-icon-8"></span><span
                                    class="w-icon-md">邵老师</span><span class="w-icon-arrow"></span></a>
                    </div>
                    <div class="select">
                        <a>test</a>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</div>


<ul class="list-group">
    <li class="list-group-item"><a href="javascript:void(0);">
            收藏题库
        </a></li>
    <li class="list-group-item"><a href="javascript:void(0);">
            作业发布
        </a></li>
    <li class="list-group-item"><a href="javascript:void(0);" >
            作业批改
        </a></li>
    <li class="list-group-item">
        <a href="javascript:void(0);">
            作业统计
        </a></li>
</ul>

<div class="m-container">
    <style type="text/css">
    </style>
    <div class="w-base">
        <div class="w-base-title">
            <h3 style="margin-top: 0">资源</h3>
            <div class="w-base-right w-base-switch">
                <ul>
                    <li class="active"><a href="/teacher/resource/share.vpage?subject=MATH"><span class="h-arrow"><i
                                        class="w-icon-arrow w-icon-arrow-blue"></i></span><strong>课程资源</strong></a></li>
                </ul>
            </div>
        </div>
        <!--template container-->
        <div class="w-base-container">
            <!--//start-->
            <!-- 共享资源 -->
            <div class="resBody" onload="init()">
                <div class="row">
                    <dl class="catList">
                        <dt>类型：</dt>
                        <dd class="cur"><a href="/我也想知道这里纺纱">全部</a></dd>
                        <dd><a href="/我也想知道这里放啥">语文</a></dd>
                        <dd><a href="我也想知道这里放啥">数学</a></dd>
                    </dl>
                </div>
                <div class="row searchRow">
                    <div class="left">
                        <form class="searchForm" method="post" target="_blank" action="/open.php?mod=goto">


                            <label for="searchBox">搜索：</label>
                            <input id="searchBox" type="text" name="srchtxt" placeholder="输入关键字搜索作业题">
                            <input type="submit" value="搜索" onclick="某个函数">
                        </form>
                    </div>
                    <a class="uploadBtn" target="_blank"
                       href="/open.php?mod=goto&amp;url=/forum.php%3Fmod%3Dpost%26action%3Dnewthread%26fid%3D51"
                       onclick="tongji('上传')">我要上传</a>
                </div>
                <table class="resTable">
                    <thead>
                    <tr>
                        <th class="first">标题</th>
                        <th class="last">作者</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td><a target="_blank"
                               href="/open.php?mod=goto&amp;url=/forum.php%3Fmod%3Dviewthread%26tid%3D48182%26extra%3Dpage%3D1"
                               onclick="tongji('列表')">五年级数学竞赛试卷</a></td>
                        <td>王老师</td>
                    </tr>
                    <tr>
                        <td><a target="_blank"
                               href="/open.php?mod=goto&amp;url=/forum.php%3Fmod%3Dviewthread%26tid%3D45864%26extra%3Dpage%3D1"
                               onclick="tongji('列表')">五年级数学</a></td>
                        <td>张老师</td>
                    </tr>
                    </tbody>
                </table>
                <div class="pagination">
                    <ul>
                        <li><a href="?mod=resource&amp;subject=MATH">第一页</a></li>
                        <li class="cur"><a>1</a></li>
                        <li><a href="?mod=resource&amp;subject=MATH&amp;page=2">2</a></li>
                        <li><a href="?mod=resource&amp;subject=MATH&amp;page=3">3</a></li>
                        <li><a href="?mod=resource&amp;subject=MATH&amp;page=4">4</a></li>
                        <li><a href="?mod=resource&amp;subject=MATH&amp;page=2">下一页</a></li>
                    </ul>
                    <div class="skip">
                        <form method="get" action="">
                            <input type="hidden" name="mod" value="resource">
                            <input type="hidden" name="subject" value="MATH">
                            <span>跳到</span>
                            <input name="page" type="text" size="3">
                            <span>页</span>
                            <input type="submit" value="GO">
                        </form>
                    </div>
                </div>
                <script type="text/javascript">
                    function tongji(action) {
                        window._hmt = window._hmt || [];
                        var param = '共享资源-' + action;
                        _hmt.push(["_trackEvent", param, param, param]);
                    }

                    function init() {
                        _gaq.push(['_trackPageview']);

                        var async_loader = function () {
                            var scr;
                            var baidu_tongji = document.createElement('script');
                            baidu_tongji.type = 'text/javascript';
                            baidu_tongji.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'hm.baidu.com' + '/h.js?2059f9a2bcb86599f5456e3cbd7eb48c';
                            scr = document.getElementsByTagName('script')[0];
                            scr.parentNode.insertBefore(baidu_tongji, scr);

                            var ga = document.createElement('script');
                            ga.type = 'text/javascript';
                            ga.async = true;
                            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                            scr = document.getElementsByTagName('script')[0];
                            scr.parentNode.insertBefore(ga, scr);
                        };
                        if (window.attachEvent)
                            window.attachEvent('onload', async_loader);
                        else if (window.addEventListener)
                            window.addEventListener('load', async_loader, false);
                    }
                </script>

            </div>
            <!--end//-->
        </div>
    </div>
</div>

<ul class="nav nav-pills nav-stacked">
    <li role="presentation" class="active"><a href="#">Home</a></li>
    <li role="presentation"><a href="#">Profile</a></li>
    <li role="presentation"><a href="#">Messages</a></li>
</ul>

<div class="w-form-table">
    <dl>
        <form id="uploa-head-form">
            <dt>头像：</dt>
            <dd>
                <input type="file" id="head" name="nickname"
                       disabled placeholder="请上传您的头像">
            </dd>
            <input type="button" value="上传头像" onclick="upload_head_click()" />
        </form>

        <form id="personal-data">
            <dt>昵称：</dt>
            <dd>
                <input type="text" id="nickname" class="w-int" name="nickname"
                       disabled placeholder="请输入您的昵称">
            </dd>
            <dt>性别：</dt>
            <dd>
                <input type="radio" name="sex" value=1 checked disabled>男
                <input type="radio" name="sex" value=0 disabled>女
            </dd>
            <dt>所在学校：</dt>
            <dd>
                <input type="text"  class="w-int" name="school"
                       disabled placeholder="请输入您的所在学校">
            </dd>
            <dt>所在地区：</dt>
            <dd>
                <div style="position:relative;">
                    <input id="city-picker" readonly type="text" data-toggle="city-picker"
                           name="address" disabled>
                </div>
            </dd>
            <dt>个性签名：</dt>
            <dd>
                <input type="text" class="w-int" name="description"
                       disabled placeholder="请输入您的个性签名">
            </dd>
            <dt>生日：</dt>
            <dd>
                <input type="date" name="birthday" disabled>
            </dd>
        </form>
    </dl>
    <button class="btn btn-warning" type="button" id="pernsonal-correct-button"
            onclick="$(this).siblings('dl').find('input').attr('disabled',false);">修改
    </button>
    <button class="btn btn-primary" type="button" id="personal-conrim-button"
            onclick="personal_confirm_click()">确定
    </button>
</div>


<div class="panel panel-default">
    <!-- Default panel contents -->
    <div class="panel-heading">
        <h4 class="panel-title">
            <div class="row" style="margin: 0;text-align: center">
                <div class="col-xs-10" style="padding-top: 10px">
                    <a role="button" data-toggle="collapse" data-parent="#accordion"
                       href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                        五年级语文
                    </a>
                </div>
                <div class="col-xs-2">
                    <button type="button" class="btn btn-danger">删除</button>
                </div>
            </div>
        </h4>
    </div>
    <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel"
         aria-labelledby="headingOne">
        <div class="panel-body">
            Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad
            squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck
            quinoa
            nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid
            single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft
            beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher
            vice
            lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you
            probably haven't heard of them accusamus labore sustainable VHS.
            <table class="table table-hover .table-bordered table-condensed">
                <tr>
                    <th>昵称</th>
                    <th>性别</th>
                    <th>类别</th>
                    <th>电话</th>
                </tr>
                <tr>
                    <td>张三</td>
                    <td>男</td>
                    <td>教师</td>
                    <td>183xxxxxxxx</td>
                </tr>
                <tr>
                    <td>李四</td>
                    <td>女</td>
                    <td>学生</td>
                    <td>183xxxxxxxx</td>
                </tr>
                <tr>
                    <td>王五</td>
                    <td>未知</td>
                    <td>学生</td>
                    <td>183xxxxxxxx</td>
                </tr>
            </table>
        </div>
    </div>
</div>

$.post("http://123.206.80.54:7000/class/list", {
loginToken: $.cookie('loginToken'),
classId : course_info.id
},

{"filename":"head.jpg","path":"34989d7c-96c8-479b-ba79-d7f426bf310a"}

//作业上传页面，添加题目
var choiceCounter = 0;
var subjectiveCounter = 0;
$('#addSubjective').click(function () {
var idName = "subjectiveQuestion-" + subjectiveCounter;
subjectiveCounter++;
var subjective_question = '<div style="margin:30px auto 50px auto;width: 90%;" id="' + idName + '">\
    <div>\
        <textarea name="instruction" id="" cols="20" rows="4"\
                  maxlength="200" placeholder="此处可输入对题目的描述"\
                  class="form-control"></textarea>\
    </div>\
    <div style="margin-top: 5px">\
        <input type="file" name="file" maxlength="20" style="float: left">\
        <div style="display: inline-block;float: right">\
            <button type="button" class="btn btn-warning quesiton-correct"\
                    onclick="question_correct(event);" disabled>修改</button>\
            <button type="button" class="btn btn-danger question-delete"\
                    onclick="$(this).parent().parent().parent().remove();choiceCounter--;">删除</button>\
            <button type="button" class="btn btn-primary question-confirm"\
                    onclick="question_confirm(event);">确定</button>\
        </div>\
    </div>\
</div>';
$('#upload-list').append(subjective_question);
});
$('#addChoice').click(function () {
var idName = "choiceQuestion-" + subjectiveCounter;
subjectiveCounter++;
var choice_question = '<div style="margin:30px auto 50px auto;width: 90%;" id="' + idName + '">\
    <input type="file" name="file" maxlength="20">\
    <div>\
        <textarea name="instruction" id="" cols="20" rows="4"\
                  maxlength="200" placeholder="此处可输入对题目的描述"\
                  class="form-control"></textarea>\
    </div>\
    <br/>\
    <button type="button" class="btn btn-primary question-confirm"\
            onclick="question_confirm(event)" \
    ">确定</button>\
    <button type="button" class="btn btn-warning question-correct"\
            onclick="question_correct(event)">修改</button>\
    <button type="button" class="btn btn-danger question-delete"\
            onclick="$(this).parent().remove();subjectiveCounter--;">删除</button>\
</div>';
$('#upload-list').append(choice_question);
});

//作业上传页面，确定题目
function question_confirm(event) {
var parent = $(event.target).parents('.homework-post-form');
parent.find("input").attr("disabled", true);
parent.find("select").attr("disabled", true);
parent.find("textarea").attr("disabled", true);
parent.find(".btn-warning").attr("disabled", false);
parent.find(".btn-danger").attr("disabled", true);
}

//作业上传页面，修改题目
function question_correct(event) {
var parent = $(event.target).parents('.homework-post-form');
parent.find("input").attr("disabled", false);
parent.find("textarea").attr("disabled", false);
parent.find(".btn-danger").attr("disabled", false);
}

作业名称：<input type="text">
截止时间：<input type="text" value="2012-05-15 21:05" id="datetimepicker-0"
            data-date-format="yyyy-mm-dd hh:ii">
选择难度：<select name="level">
    <option value="1">1.0</option>
    <option value="2">2.0</option>
    <option value="3">3.0</option>
    <option value="4">4.0</option>
    <option value="5">5.0</option>
</select>
选择标签：<select name="label" multiple>
    <option value="阅读题">阅读题</option>
    <option value="戏剧史">戏剧史</option>
    <option value="德玛西亚">德玛西亚</option>
</select>
添加标签：<input type="text">
<button type="submit" class="btn btn-success" style="margin:0 45%">全部上传</button>

//作业上传页面，添加题目
var choiceCounter = 0;
var subjectiveCounter = 0;
$('#addSubjective').click(function () {
var idName = "subjectiveQuestion-" + subjectiveCounter;
subjectiveCounter++;
var subjective_question = '<div style="margin:30px auto 50px auto;width: 90%;" id="' + idName + '">\
    <div>\
        <textarea name="instruction" id="" cols="20" rows="4"\
                  maxlength="200" placeholder="此处可输入对题目的描述"\
                  class="form-control"></textarea>\
    </div>\
    <div style="margin-top: 5px">\
        <input type="file" name="file" maxlength="20" style="float: left">\
        <div style="display: inline-block;float: right">\
            <button type="button" class="btn btn-warning quesiton-correct"\
                    onclick="question_correct(event);" disabled>修改</button>\
            <button type="button" class="btn btn-danger question-delete"\
                    onclick="$(this).parent().parent().parent().remove();choiceCounter--;">删除</button>\
            <button type="button" class="btn btn-primary question-confirm"\
                    onclick="question_confirm(event);">确定</button>\
        </div>\
    </div>\
</div>';
$('#upload-list').append(subjective_question);
});
$('#addChoice').click(function () {
var idName = "choiceQuestion-" + subjectiveCounter;
subjectiveCounter++;
var choice_question = '<div style="margin:30px auto 50px auto;width: 90%;" id="' + idName + '">\
    <input type="file" name="file" maxlength="20">\
    <div>\
        <textarea name="instruction" id="" cols="20" rows="4"\
                  maxlength="200" placeholder="此处可输入对题目的描述"\
                  class="form-control"></textarea>\
    </div>\
    <br/>\
    <button type="button" class="btn btn-primary question-confirm"\
            onclick="question_confirm(event)" \
    ">确定</button>\
    <button type="button" class="btn btn-warning question-correct"\
            onclick="question_correct(event)">修改</button>\
    <button type="button" class="btn btn-danger question-delete"\
            onclick="$(this).parent().remove();subjectiveCounter--;">删除</button>\
</div>';
$('#upload-list').append(choice_question);
});

//作业上传页面，确定题目
function question_confirm(event) {
var parent = $(event.target).parents('.homework-post-form');
parent.find("input").attr("disabled", true);
parent.find("select").attr("disabled", true);
parent.find("textarea").attr("disabled", true);
parent.find(".btn-warning").attr("disabled", false);
parent.find(".btn-danger").attr("disabled", true);
}

//作业上传页面，修改题目
function question_correct(event) {
var parent = $(event.target).parents('.homework-post-form');
parent.find("input").attr("disabled", false);
parent.find("textarea").attr("disabled", false);
parent.find(".btn-danger").attr("disabled", false);
}

<form class="form-horizontal" style="width: 80%;margin: 0 auto;" action="">
    <div class="form-group">
        <label for="homework-file" class="col-sm-2 control-label">添加附件：</label>
        <div class="col-sm-10">
            请先上传作业再上传文件
            <input type="file" class="form-control"
                   name="homework-file" id="homework-file">
            <input type="text" class="form-control"
                   name="homeworkId" id="homeworkId" style="display: none">
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="button" class="btn btn-primary"
                    onclick="">上传文件</button>
        </div>
    </div>
</form>

function upload_head_click() {
var form = $("#upload-head-form");
var form2 = $("#personal-form");
//console.log(form.find("[name='head']").val());
var file = new FormData(form[0]);
$.ajax({
url: "http://123.206.80.54:7000/file/upload",
type: 'POST',
data: file,
async: false,
cache: false,
contentType: false,
processData: false,
success: function (status, error, res) {
form2.find("[name='fileName']").val(res.responseJSON.res[0].filename);
form2.find("[name='picturePath']").val(res.responseJSON.res[0].path);
},
error: function (status, error, res) {
}
});
}

$.post("http://123.206.80.54:7000/homework/get", {
loginToken: $.cookie('loginToken'),
classId :
},
function (status, error, res) {

}, 'json');

<div class="form-group">
    <label for="select-homework">选择时间：</label>
    <select name="homework" id="select-homework" class="form-control">
        <option value="第一次">4月1日</option>
        <option value="第二次">4月2日</option>
        <option value="第三次">4月3日</option>
    </select>
</div>
<div class="form-group">
    <label for="select-isChecked">是否已批改：</label>
    <select name="isChecked" id="select-isChecked" class="form-control">
        <option value="已批改">已批改</option>
        <option value="未批改">未批改</option>
    </select>
</div>

homework-check-student-panels

<div style="margin:30px auto 5px auto;width: 50%;" id="subjectiveQuestion-0">
    <form class="form-inline homework-post-form" action="">
        <div class="form-group">
            <label for="homework-title">作业名称：</label>
            <input type="text" class="form-control" id="homework-title" placeholder="作业名称">
        </div>
        <div class="form-group">
            <label for="homework-level">作业难度：</label>
            <select name="homework-level" class="form-control" id="homework-level" placeholder="作业难度">
                <option value="0">很简单</option>
                <option value="1">简单</option>
                <option value="2">中等</option>
                <option value="3">困难</option>
                <option value="4">很困难</option>
                <option value="5">地狱级</option>
            </select>
        </div>
        <div class="form-group">
            <div class="" id="sex">
                <label class="radio-inline">
                    <input type="radio" name="sex" value=1 disabled>添加到题库
                </label>
                <label class="radio-inline">
                    <input type="radio" name="sex" value=0 disabled>不添加
                </label>
            </div>
        </div>
        <div class="form-group">
            <textarea class="form-control" id="instruction" name="instruction"
                      rows="3" cols="80" placeholder="此处可输入对题目的描述">
            </textarea>
        </div>
        <br/>
        <div class="form-group" style="width: 54.2%">
            <label for="homework-title">添加附件：</label>
            <input type="file" class="form-control" style="width: 70%" name="homework-file" id="homework-file">
        </div>
        <div class="form-group">
            <label for="homework-title">设置标签：</label>
            <input type="text" class="form-control" id="homework-tags" placeholder="输入格式：web iOS">
        </div>
        <div class="form-group">
            <label for="homework-title">所占分数：</label>
            <input type="text" class="form-control" id="homework-tags" placeholder="输入所占分数">
        </div>
        <div class="form-group">
            <label for="homework-title">作业答案：</label>
            <input type="text" class="form-control" id="homework-tags" placeholder="输入格式：A B">
        </div>
        <div style="float: right;margin-right: 10px;margin-top: 2px">
            <button type="button" class="btn btn-warning quesiton-correct"
                    onclick="question_correct(event);" disabled>修改</button>
            <button type="button" class="btn btn-danger question-delete"
                    onclick="$(this).parents('.homework-post-form').remove();">删除</button>
            <button type="button" class="btn btn-primary question-confirm"
                    onclick="question_confirm(event);">确定</button>
        </div>
    </form>
</div>;

<div class="m-container">
    <div class="chat">
        <div class="chat-left">
            <div class="chat-left-title">
                <img style="margin-left: 25%" src="images/chat/icon_father_messages.png" alt="">
                <span>私信消息</span>
            </div>
            <div class="chat-switch" style="height: 50px">
                <a href="" class="chat-switch-msg on"
                   style="background-image: url('images/chat/icon_son_messages_normal.png')" title="最近联系人"></a>
                <a href="" class="chat-switch-friend"
                   style="background-image: url('images/chat/icon_up_friends.png')" title="客户端好友"></a>
            </div>
            <div class="chat-users nano has-scrollbar">
                <div class="nano-content" style="right: -17px;">
                    <div>
                        <div class="chat-users-row chat-users-row-active" title="">
                            <img style="margin-left: 10%" src="images/chat/icon_son_friends.png"><span>枫pain1鹊</span>
                        </div>
                        <div class="chat-users-row" title="">
                            <img style="margin-left: 10%" src="images/chat/icon_son_friends.png"><span>鸑鷟鸣岐</span>
                        </div>
                        <div class="nano-pane" style="display: block;">
                            <div class="nano-slider" style="height: 417px; transform: translate(0px, 0px);">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="chat-right">
            <div class="chat-right-head">
                <div class="close_button"
                     style="background-image: url('images/chat/icon_delete_gray.png')">
                </div>
            </div>
            <div class="chat-right-panel">
                <div class="chat-messages nano j-nano">
                    <div class="chat-nano-content">

                    </div>
                </div>
                <div class="chat-send">
                    <div class="biao-qing-row"><a class="biao-qing j-emoji-open-button" href=""></a></div>
                    <!--ms-if-->
                    <div class="clearfix chat-textarea-div">
                                <textarea maxlength="1000" class="chat-send-textarea"
                                          autofocus="">
                                </textarea>
                    </div>
                    <button class="btn btn-primary" style="float: right;margin: 10px">发送</button>
                </div>
            </div>
        </div>
    </div>
</div>